%
uploadDir = "\\192.168.1.4\tesisgalicia.es\www\imagenes\productos\"
'uploadDir = "d:\xvrt\asired.es\html\desarrollo\Tesis001\imagenes\productos\"
'uploadDir = "e:\InetPub\wwwroot\desarrollo\tesisGalicia\imagenes\productos\"
ipp=6
pag = int("0" & Request.QueryString("pag"))
cat = int("0" & Request.QueryString("cat"))
subca = int("0" & Request.QueryString("sub"))
Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
SqlQuery="Select Count(*) as cuenta from productos where categoria="&cat&" and subcategoria="&subca&""
SET RsTotal = OBJdbConnection.Execute(SQLQuery)
total = RsTotal("Cuenta")
SET RsTotal = Nothing
numpag = int((total-1)/ipp)
if pag > numpag then pag=pag-1 END IF
if pag < 0 then pag=0 END IF
SQlQuery="Select * from productos where categoria="&cat&" and subcategoria="&subca&""
Set RsProd = ObjDbConnection.execute(SqlQuery)
If pag <> 0 Then
RsProd.Move (pag*ipp)
End If
%>
<%
SQLQuery = "select * from categorias where idcategoria="&cat
Set catnom = OBJdbConnection.Execute(SQLQuery)
cat1 = catnom("nombre")
if subca<>0 then
SQLQuery = "select * from subcategorias where idsubcategoria="&subca
Set subcanom = OBJdbConnection.Execute(SQLQuery)
sub1 = subcanom("nombre")
else
sub1 = "Otras subcategorías"
end if
%>
<%=cat1%> - <%=sub1%>
<%
if not RsProd.Eof then
cuenta=1
do while not RsProd.Eof
if Cuenta > ipp Then
Exit Do
end if
%>
<%if not RsProd.eof then%><%=fichas_Productos%><%cuenta=cuenta+1%><%RsProd.movenext%><%else%><%end if%>
<%if not RsProd.eof then%><%=fichas_Productos%><%else%><%end if%>
<%
if not RsProd.eof then
cuenta=cuenta+1
RsProd.movenext
End If
loop
%>
<%end if%>